package com.service;

import com.entity.*;
import com.mapper.StationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StationService {
    @Autowired
    private StationMapper stationMapper;

    public List<Station> findAll(){
        return stationMapper.findAll();
    }

    public int addStation(Station station){
        return stationMapper.addStation(station);
    }

    public int deleteStation(String stnum){
        return stationMapper.deleteStation(stnum);
    }

    public int editStation(Station station){
        return stationMapper.editStation(station);
    }

    public Station upStation(String stnum){
        return stationMapper.upStation(stnum);
    }
}
